{% extends "admin/base_site.html" %}

<!-- LOADING -->
{% load i18n adminmedia fb_versions %}

<!-- STYLESHEETS -->
{% block stylesheets %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelist.css" />
{% endblock %}

<!-- CONTENT -->
{% block content %}
<h1>Medman {% if force %}<span style="color: red;">Force</span> {% endif %}Sync <small>"in full affect!"</small></h1>
<div id="content-main">
    <ul class="object-tools">
        <li>
            <a href="{% url medman_sync_all %}" class="addlink">
                Force Sync Medman Data (overwrite all existing medman data)
            </a>
        </li>
    </ul>
    {% if file_list %}
    <div id="changelist">
        <div class="result-list">
        <table>
            <thead>
                <tr>
                    <th>&nbsp;</th>
                    <th>Path</th>
                </tr>
            </thead>
            <tbody>
        {% for file in file_list %}
            <tr class="row1">
                <td><img src="{% version file.path "fb_thumb" %}" /></td>
                <td>{{ file.path }}</td>
            </tr>
        {% endfor %}
            </tbody>
        </table>
        </div>
    </div>
    {% else %}
        nothing to do
    {% endif %}
    <br /><br />
    <p>
        <a href="javascript:history.go({% if force %}-2{% else %}-1{% endif %})">
            Back
        </a>
    </p>
</div>
{% endblock %}